﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Lapkin.Models.DataModels
{
    public class ProductProperty
    {
        [Key]
        public Guid Id { get; set; }
        public String Name { get; set; }

        public virtual ICollection<ProductPropertyProduct> Products { get; set; }
    }

    public class ProductPropertyProduct
    {
        [Key, Column(Order = 0)]
        public Guid ProductId { get; set; }
        [Key, Column(Order = 1)]
        public Guid PropertyId { get; set; }

        public virtual ProductProperty Property { get; set; }
        public virtual Product Product { get; set; }

        public String Value { get; set; }
    }
}